package org.example.api;

import org.example.res.User;
import org.example.service.TestFallbackService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author liyishan
 * @date 2023/7/21 16:22
 * @apiNote
 */
@FeignClient(value ="ddd-demo",fallback = TestFallbackService.class)
public interface TestService {
    @GetMapping("/test/demo")
    String demo();

    @GetMapping("/test/demo1")
    String demo1(@RequestParam("name") String name);


    @PostMapping("/test/demo2")
    User demo2(@RequestBody User name);




    }
